/**
 * @Title: settle_router.js
 * @Description: 结算指标router
 * Copyright: Copyright (c) 2014 
 * Company:中国平安
 *
 * @Project HIMS-FWA
 * @author QIANDUO875
 * @date 2014年9月25日 下午2:01:05
 * @version V1.0
 */
;
(function(){
	'use strict';
	
	var app = angular.module('mhis.configs');
	app.config(['BaseURL','Config', function(baseUrl,Config){
		
		var states = Config.states;
		
		states.push({
			name:'institutionInfo',
	        url:'/institutionInfo',
	        data:{
	        	title:'我的工作区',
	        	tabRoot:'institutionInfo'
	        },
	        deepStateRedirect: true,
	        sticky: true,
	        views:{
	            'institutionInfo@':{
	            	template:'<div ui-view class="full-height full-width"></div>',
	            	controller:function() {
	            	}
	            }
	        }
		});
		
		
		states.push({
			name:'institutionInfo.institution',
	        url:'/institution',
	        data:{
	        	title:'机构信息',
	        	tabRoot:'institutionInfo'
	        },
	        views:{
	        	'@institutionInfo':{
	        		templateUrl:baseUrl+'views/hcpms/institution/list.html',
	        		controller:'institutionListCtrl'
	        	}
	        }
		});
		
		states.push({
			name:'institutionInfo.pharmacy',
	        url:'/pharmacy',
	        data:{
	        	title:'机构信息',
	        	tabRoot:'institutionInfo'
	        },
	        views:{
	        	'@institutionInfo':{
	        		templateUrl:baseUrl+'views/hcpms/institution/list.html',
	        		controller:'pharmacyListCtrl'
	        	}
	        }
		});
		
		states.push({
			name:'institutionInfo.addInstitution',
	        url:'/addInstitution',
	        data:{
	        	title:'机构信息',
	        	tabRoot:'institutionInfo'
	        },
	        views:{
	        	'@institutionInfo':{
	        		templateUrl:baseUrl+'views/hcpms/institution/newBase_info.html',
	        		controller:'institutionAddCtrl'
	        	}
	        }
		});
		
        states.push({
            name:'institutionInfo.institutionDetail',
            url:'/institutionDetail/:providerid/:type',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/base_info.html',
                    controller:'institutionDetailCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.phmaracyDetail',
            url:'/phmaracyDetail/:providerid/:type',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/pharmacy_info.html',
                    controller:'institutionDetailCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.equipmentDetail',
            url:'/equipmentDetail/:providerid',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/equipment.html',
                    controller:'equipmentDetailCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.ruleInfo',
            url:'/ruleInfo/:providerid',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/rule_info.html',
                    controller:'ruleInfoCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.relation',
            url:'/relation/:providerid/:type',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/relation_info.html',
                    controller:'relationCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.accountInfo',
            url:'/accountInfo/:providerid',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/account_info.html',
                    controller:'accountInfoCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.medicalProject',
            url:'/medicalProject/:providerid',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/medical_project_info_list.html',
                    controller:'medicalProjectCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.doctorInfoDetail',
            url:'/doctorInfoDetail/:providerid/:type',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/doctor_info.html',
                    controller:'doctorInfoCtrl'
                }
            }
        });
        
        states.push({
            name:'institutionInfo.addDoctorInfo',
            url:'/addDoctorInfo/:providerid/:doctorId/:type',
            data:{
                title:'机构信息',
                tabRoot:'institutionInfo'
            },
            views:{
                '@institutionInfo':{
                    templateUrl:baseUrl+'views/hcpms/institution/doctor_info_add.html',
                    controller:'addDoctorInfoCtrl'
                }
            }
        });
//	    states.push({
//	        name:'institution',
//	        url:'/institution',
//	        data:{
//	        	title:'我的工作区',
//	        	tabRoot:'institution'
//	        },
//	        views:{
//	            '@idesk':{
//	            	templateUrl:baseUrl+'/views/infra/idesk/idesk_check.html',
//	            	controller:'IDeskCtrl'
//	            }
//	        }
//	    });
		
    	/**
		 * 协议信息
		 * 
		 */
        states.push({
			name:'agreement',
	        url:'/agreement',
	        data:{
	        	title:'我的工作区',
	        	tabRoot:'agreement'
	        },
	        deepStateRedirect: true,
	        sticky: true,
	        views:{
	            'agreement@':{
	            	template:'<div ui-view class="full-height full-width"></div>',
	            	controller:function() {
	            	}
	            }
	        }
		});
  
			states.push({
				name:'agreement.agreementBase',
		        url:'/agreementBase',
		        data:{
		        	title:'协议信息',
		        	tabRoot:'agreement'
		        },
		        views:{
		            '@agreement':{
		            	templateUrl:baseUrl+'views/hcpms/agreement/agreement_view.htm',
		            	controller:'AgreementListCtrl'
		            }
		        }
			});
			
			states.push({
				name:'agreement.detail',
		        url:'/detail/:providerid',
		        data:{
		        	title:'协议信息',
		        	tabRoot:'agreement'
		        },
		        views:{
		            '@agreement':{
		            	templateUrl:baseUrl+'views/hcpms/agreement/detail.htm',
		            	controller:'AgreementDetailCtrl'
		            }
		        }
			});
			
			states.push({
	            name:'agreement.paymentDetail',
	            url:'/paymentDetail/:providerid',
	            data:{
	                title:'协议信息',
	                tabRoot:'agreement'
	            },
	            views:{
	                '@agreement':{
	                    templateUrl:baseUrl+'views/hcpms/agreement/payment_detail.htm',
	                    controller:'AgreementPayMentCtrl'
	                }
	            }
	        });
	        
	        states.push({
	            name:'agreement.prePayMent',
	            url:'/prePayMent/:providerid',
	            data:{
	                title:'协议信息',
	                tabRoot:'agreement'
	            },
	            views:{
	                '@agreement':{
	                    templateUrl:baseUrl+'views/hcpms/agreement/prepayment.htm',
	                    controller:'AgreementPreAuthCtrl'
	                }
	            }
	        });
			
	        states.push({
	            name:'agreement.addAgreement',
	            url:'/addAgreement/:providerid',
	            data:{
	                title:'协议信息',
	                tabRoot:'agreement'
	            },
	            views:{
	                '@agreement':{
	                    templateUrl:baseUrl+'views/hcpms/agreement/agreement_add.htm',
	                    controller:'AgreementAddCtrl'
	                }
	            }
	        });
	        
	        /**
	         * 人员信息
	         */
	        
			states.push({
				name:'insurance',
		        url:'/insurance',
		        data:{
		        	title:'人员信息',
		        	tabRoot:'insurance'
		        },
		        deepStateRedirect: true,
		        sticky: true,
		        views:{
		            'insurance@':{
		            	template:'<div ui-view class="full-height full-width"></div>',
		            	controller:function() {
		            	}
		            }
		        }
			});
			
	        states.push({
				name:'insurance.insuranceList',
		        url:'/insuranceList',
		        data:{
		        	title:'人员信息',
		        	tabRoot:'insurance'
		        },
//		        deepStateRedirect: true,
//		        sticky: true,
		        views:{
		            '@insurance':{
		            	templateUrl:baseUrl+'views/hcpms/insurance/insurance_view.html',
		            	controller:'InsuranceCtrl'
		            }
		        }
			});
	        
	        
	        states.push({
				name:'insurance.detail',
		        url:'/detail/:providerid/:doctorId/:type',
		        data:{
		        	title:'人员信息',
		        	tabRoot:'insurance'
		        },
		        sticky: true,
		        views:{
		            '@insurance':{
		            	templateUrl:baseUrl+'views/hcpms/institution/doctor_info_add.html',
		            	controller:'addDoctorInfoCtrl'
		            }
		        }
			});
	        
	        /**
	         * 评分标准
	         */
	        states.push({
				name:'grading',
		        url:'/grading',
		        data:{
		        	title:'评分标准',
		        	tabRoot:'grading'
		        },
		        deepStateRedirect: true,
		        sticky: true,
		        views:{
		            'grading@':{
		            	templateUrl:baseUrl+'views/hcpms/agreement/grading/grading_view.html',
		            	controller:'GradingCtrl'
		            }
		        }
			});
	        /**
	         * 医疗机构评分标准
	         */
	        states.push({
				name:'grading.orgGrading',
		        url:'/orgGrading',
		        data:{
		        	title:'评分标准',
		        	tabRoot:'grading'
		        },
		        views:{
		            '@grading':{
		            	templateUrl:baseUrl+'views/hcpms/agreement/grading/orgGrading_view.html',
		            	controller:'OrgGradingCtrl'
		            }
		        }
			});
	        /**
	         *  医保服务人员 评分标准
	         */
	        states.push({
				name:'grading.insurance',
		        url:'/insurance',
		        data:{
		        	title:'评分标准',
		        	tabRoot:'grading'
		        },
		        views:{
		            '@grading':{
		            	templateUrl:baseUrl+'views/hcpms/agreement/grading/insuranceGrading_view.html',
		            	controller:'InsuranceGradingCtrl'
		            }
		        }
			});
	        
	        /**
	         *  药店 评分标准
	         */
	        states.push({
				name:'grading.drugstore',
		        url:'/drugstore',
		        data:{
		        	title:'评分标准',
		        	tabRoot:'grading'
		        },
		        views:{
		            '@grading':{
		            	templateUrl:baseUrl+'views/hcpms/agreement/grading/drugstoreGrading_view.html',
		            	controller:'DrugstoreGradingCtrl'
		            }
		        }
			});
	        
	        
	        
	        /************
	         * 
	         * 结算报告
	         * 
	         *******/
	        states.push({
	        	name:'report',
	        	url:'/report',
	        	deepStateRedirect: true,
	            sticky: true,
	            data:{
	            	title:'结算报告',
	            	tabRoot:'report'
	            },
		        views:{
		            'report@':{
		            	templateUrl:baseUrl+'views/hcpms/quota/report.htm',
		            	controller:'reportCtrl'
		            }
		        }
	        });
	        
	}]);
	
})();